#ifndef SETTINGSVIEW_H
#define SETTINGSVIEW_H

#include "widgets/scrollview.h"
#include <QDir>
#include <QLabel>
#include <QStyle>
#include <QTimer>

namespace Ui {
class SettingsView;
}

class SettingsView : public ScrollView
{
    Q_OBJECT
public:
    explicit SettingsView(QWidget* parent = nullptr);
    ~SettingsView();

private:
    void autoSaveRecorderSettings();
    void autoSaveAudioSettings();
    void autoSaveVideoSettings();
    void autoSaveScreenCaptureSettings();

    void loadSettings();
    void selectVideoDir();
    void selectScreenCapturePath();

    // 应用预设配置的函数
    void applyPreset(int index);

    static bool validateVideoDir(const QDir& dir, QLabel* warning_label);

    Ui::SettingsView* ui;
};

#endif // SETTINGSVIEW_H
